package me.zixing.java.chapter01;

import java.util.Scanner;

/**
 * Created by bingh on 2017/9/13.
 */
public class Subject01 {
    public static void main (String[] args) throws Exception{
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入月份:");
        int month = 0;
        try{
             month = scanner.nextInt();
        }catch (Exception e){
            throw new Exception("输入有误");
        }

        switch (month){
            case 1:
            case 2:
            case 3:
                System.out.println("春");
                break;
            case 4:
            case 5:
            case 6:
                System.out.println("夏");
                break;
            case 7:
            case 8:
            case 9:
                System.out.println("秋");
                break;
            case 10:
            case 11:
            case 12:
                System.out.println("冬");
                break;
            default:
                System.out.println("月份有误");
        }
    }
}
